/**
 * @description 文章相关路由
 * @author wen
 * @date 2025.2.10
 * @param {*} router
 * @returns {*}
 */

const express = require('express');
const router = express.Router();
const service=require('../services/postService')

// 创建文章
router.post("/createPost",service.createPost)
//更新文章
router.post("/updatePost",service.updatePost) 
// 获取当前用户的文章列表
router.get("/getUserPostList",service.getUserPostList)
// 获取文章详情
router.get("/getPostDetail",service.getPostDetail)
// 获取所有文章列表
router.get("/getPostList",service.getPostList)
// 点赞
router.post("/like",service.likePost)
// 发布评论
router.post('/commentPost',service.commentPost)
// 获取所有评论
router.post('/getCommentList',service.getCommentList)
// 删除评论
router.post('/deleteComment',service.deleteComment)
// 所以点赞记录
router.post('/getAllLikes',service.getAllLikes)
module.exports = router;